// @algorithm @lc id=100295 lang=cpp
// @title shu-zhi-de-zheng-shu-ci-fang-lcof

#include "algm/algm.h"
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Solution {
    // @test(0.44528, 0)=1.0
public:
    double quickMul(double x, long long n) {
        if (n == 0) {
            return 1.0;
        }
        double y = quickMul(x, n / 2);
        return n % 2 == 0 ? y * y : y * y * x;
    }
    double myPow(double x, int n) {
        return n >= 0 ? quickMul(x, n) : 1.0 / quickMul(x, -(long long)n);
    }
};